require 'merge/profile_merger'

conditions = true
conditions = ARGV[0] unless ARGV[0].nil? 

pm = Merge::ProfileMerger.new :conditions => conditions

puts "conditions => #{conditions}"

pm.start_merge
File.open("#{Rails.public_path}/statisctic/overlap_stat.txt", 'wb') {|f|
  pm.get_statistic.each_pair {|k,v|
    f.puts k
    v.each_pair {|n,fre|
      f.puts "\t #{n} -> #{fre}"
    }
  }
}